Delta Volume Columns Pro [LucF]█ OVERVIEW
This indicator displays volume delta information calculated with intrabar inspection on historical bars, and feed updates when running in realtime. It is designed to run in a pane and can display either stacked buy/sell volume columns or a signal line which can be calculated and displayed in many different ways.
Five different models are offered to reveal different characteristics of the calculated volume delta information. Many options are offered to visualize the calculations, giving you much leeway in morphing the indicator's visuals to suit your needs. If you value delta volume information, I hope you will find the time required to master Delta Volume Columns Pro well worth the investment. I am confident that if you combine a proper understanding of the indicator's information with an intimate knowledge of the volume idiosyncrasies on the markets you trade, you can extract useful market intelligence using this tool.
█ WARNINGS
1. The indicator only works on markets where volume information is available,
Please validate that your symbol's feed carries volume information before asking me why the indicator doesn't plot values.
2. When you refresh your chart or re-execute the script on the chart, the indicator will repaint because elapsed realtime bars will then recalculate as historical bars.
3. Because the indicator uses different modes of calculation on historical and realtime bars, it's critical that you understand the differences between them. Details are provided further down.
4. Calculations using intrabar inspection on historical bars can only be done from some chart timeframes. See further down for a list of supported timeframes.
If the chart's timeframe is not supported, no historical volume delta will display.
█ CONCEPTS
Chart bars
Three different types of bars are used in charts:
1. Historical bars are bars that have already closed when the script executes on them.
2. The realtime bar is the current, incomplete bar where a script is running on an open market. There is only one active realtime bar on your chart at any given time.
The realtime bar is where alerts trigger.
3. Elapsed realtime bars are bars that were calculated when they were realtime bars but have since closed.
When a script re-executes on a chart because the browser tab is refreshed or some of its inputs are changed, elapsed realtime bars are recalculated as historical bars.
Why does this indicator use two modes of calculation?
Historical bars on TradingView charts contain OHLCV data only, which is insufficient to calculate volume delta on them with any level of precision. To mine more detailed information from those bars we look at intrabars , i.e., bars from a smaller timeframe (we call it the intrabar timeframe ) that are contained in one chart bar. If your chart Is running at 1D on a 24x7 market for example, most 1D chart bars will contain 24 underlying 1H bars in their dilation. On historical bars, this indicator looks at those intrabars to amass volume delta information. If the intrabar is up, its volume goes in the Buy bin, and inversely for the Sell bin. When price does not move on an intrabar, the polarity of the last known movement is used to determine in which bin its volume goes.
In realtime, we have access to price and volume change for each update of the chart. Because a 1D chart bar can be updated tens of thousands of times during the day, volume delta calculations on those updates is much more precise. This precision, however, comes at a price:
— The script must be running on the chart for it to keep calculating in realtime.
— If you refresh your chart you will lose all accumulated realtime calculations on elapsed realtime bars, and the realtime bar.
Elapsed realtime bars will recalculate as historical bars, i.e., using intrabar inspection, and the realtime bar's calculations will reset.
When the script recalculates elapsed realtime bars as historical bars, the values on those bars will change, which means the script repaints in those conditions.
— When the indicator first calculates on a chart containing an incomplete realtime bar, it will count ALL the existing volume on the bar as Buy or Sell volume,
depending on the polarity of the bar at that point. This will skew calculations for that first bar. Scripts have no access to the history of a realtime bar's previous updates,
and intrabar inspection cannot be used on realtime bars, so this is the only to go about this.
— Even if alerts only trigger upon confirmation of their conditions after the realtime bar closes, they are repainting alerts
because they would perhaps not have calculated the same way using intrabar inspection.
— On markets like stocks that often have different EOD and intraday feeds and volume information,
the volume's scale may not be the same for the realtime bar if your chart is at 1D, for example,
and the indicator is using an intraday timeframe to calculate on historical bars.
— Any chart timeframe can be used in realtime mode, but plots that include moving averages in their calculations may require many elapsed realtime bars before they can calculate.
You might prefer drastically reducing the periods of the moving averages, or using the volume columns mode, which displays instant values, instead of the line.
Volume Delta Balances
This indicator uses a variety of methods to evaluate five volume delta balances and derive other values from those balances. The five balances are:
1 — On Bar Balance : This is the only balance using instant values; it is simply the subtraction of the Sell volume from the Buy volume on the bar.
2 — Average Balance : Calculates a distinct EMA for both the Buy and Sell volumes, and subtracts the Sell EMA from the Buy EMA.
3 — Momentum Balance : Starts by calculating, separately for both Buy and Sell volumes, the difference between the same EMAs used in "Average Balance" and
an SMA of double the period used for the "Average Balance" EMAs. The difference for the Sell side is subtracted from the difference for the Buy side,
and an RSI of that value is calculated and brought over the −50/+50 scale.
4 — Relative Balance : The reference values used in the calculation are the Buy and Sell EMAs used in the "Average Balance".
From those, we calculate two intermediate values using how much the instant Buy and Sell volumes on the bar exceed their respective EMA — but with a twist.
If the bar's Buy volume does not exceed the EMA of Buy volume, a zero value is used. The same goes for the Sell volume with the EMA of Sell volume.
Once we have our two intermediate values for the Buy and Sell volumes exceeding their respective MA, we subtract them. The final "Relative Balance" value is an ALMA of that subtraction.
The rationale behind using zero values when the bar's Buy/Sell volume does not exceed its EMA is to only take into account the more significant volume.
If both instant volume values exceed their MA, then the difference between the two is the signal's value.
The signal is called "relative" because the intermediate values are the difference between the instant Buy/Sell volumes and their respective MA.
This balance flatlines when the bar's Buy/Sell volumes do not exceed their EMAs, which makes it useful to spot areas where trader interest dwindles, such as consolidations.
The smaller the period of the final value's ALMA, the more easily you will see the balance flatline. These flat zones should be considered no-trade zones.
5 — Percent Balance : This balance is the ALMA of the ratio of the "On Bar Balance" value, i.e., the volume delta balance on the bar (which can be positive or negative),
over the total volume for that bar.
From the balances and marker conditions, two more values are calculated:
1 — Marker Bias : It sums the up/down (+1/‒1) occurrences of the markers 1 to 4 over a period you define, so it ranges from −4 to +4, times the period.
Its calculation will depend on the modes used to calculate markers 3 and 4.
2 — Combined Balances : This is the sum of the bull/bear (+1/−1) states of each of the five balances, so it ranges from −5 to +5.
█ FEATURES
The indicator has two main modes of operation: Columns and Line .
Columns
• In Columns mode you can display stacked Buy/Sell volume columns.
• The buy section always appears above the centerline, the sell section below.
• The top and bottom sections can be colored independently using eight different methods.
• The EMAs of the Buy/Sell values can be displayed (these are the same EMAs used to calculate the "Average Balance").
Line
• Displays one of seven signals: the five balances or one of two complementary values, i.e., the "Marker Bias" or the "Combined Balances".
• You can color the line and its fill using independent calculation modes to pack more information in the display.
You can thus appraise the state of 3 different values using the line itself, its color and the color of its fill.
• A "Divergence Levels" feature will use the line to automatically draw expanding levels on divergence events.
Default settings
Using the indicator's default settings, this is the information displayed:
• The line is calculated on the "Average Balance".
• The line's color is determined by the bull/bear state of the "Percent Balance".
• The line's fill gradient is determined by the advances/declines of the "Momentum Balance".
• The orange divergence dots are calculated using discrepancies between the polarity of the "On Bar Balance" and the chart's bar.
• The divergence levels are determined using the line's level when a divergence occurs.
• The background's fill gradient is calculated on advances/declines of the "Marker Bias".
• The chart bars are colored using advances/declines of the "Relative Balance". Divergences are shown in orange.
• The intrabar timeframe is automatically determined from the chart's timeframe so that a minimum of 50 intrabars are used to calculate volume delta on historical bars.
Alerts
The configuration of the marker conditions explained further is what determines the conditions that will trigger alerts created from this script. Note that simply selecting the display of markers does not create alerts. To create an alert on this script, you must use ALT-A from the chart. You can create multiple alerts triggering on different conditions from this same script; simply configure the markers so they define the trigger conditions for each alert before creating the alert. The configuration of the script's inputs is saved with the alert, so from then on you can change them without affecting the alert. Alert messages will mention the marker(s) that triggered the specific alert event. Keep in mind, when creating alerts on small chart timeframes, that discrepancies between alert triggers and markers displayed on your chart are to be expected. This is because the alert and your chart are running two distinct instances of the indicator on different servers and different feeds. Also keep in mind that while alerts only trigger on confirmed conditions, they are calculated using realtime calculation mode, which entails that if you refresh your chart and elapsed realtime bars recalculate as historical bars using intrabar inspection, markers will not appear in the same places they appeared in realtime. So it's important to understand that even though the alert conditions are confirmed when they trigger, these alerts will repaint.
Let's go through the sections of the script's inputs.
Columns
The size of the Buy/Sell columns always represents their respective importance on the bar, but the coloring mode for tops and bottoms is independent. The default setup uses a standard coloring mode where the Buy/Sell columns are always in the bull/bear color with a higher intensity for the winning side. Seven other coloring modes allow you to pack more information in the columns. When choosing to color the top columns using a bull/bear gradient on "Average Balance", for example, you will have bull/bear colored tops. In order for the color of the bottom columns to continue to show the instant bar balance, you can then choose the "On Bar Balance — Dual Solid Colors" coloring mode to make those bars the color of the winning side for that bar. You can display the averages of the Buy and Sell columns. If you do, its coloring is controlled through the "Line" and "Line fill" sections below.
Line and Line fill
You can select the calculation mode and the thickness of the line, and independent calculations to determine the line's color and fill.
Zero Line
The zero line can display dots when all five balances are bull/bear.
Divergences
You first select the detection mode. Divergences occur whenever the up/down direction of the signal does not match the up/down polarity of the bar. Divergences are used in three components of the indicator's visuals: the orange dot, colored chart bars, and to calculate the divergence levels on the line. The divergence levels are dynamic levels that automatically build from the line's values on divergence events. On consecutive divergences, the levels will expand, creating a channel. This implementation of the divergence levels corresponds to my view that divergences indicate anomalies, hesitations, points of uncertainty if you will. It precludes any attempt to identify a directional bias to divergences. Accordingly, the levels merely take note of divergence events and mark those points in time with levels. Traders then have a reference point from which they can evaluate further movement. The bull/bear/neutral colors used to plot the levels are also congruent with this view in that they are determined by the line's position relative to the levels, which is how I think divergences can be put to the most effective use. One of the coloring modes for the line's fill uses advances/declines in the line after divergence events.
Background
The background can show a bull/bear gradient on six different calculations. As with other gradients, you can adjust its brightness to make its importance proportional to how you use it in your analysis.
Chart bars
Chart bars can be colored using seven different methods. You have the option of emptying the body of bars where volume does not increase, as does my TLD indicator, and you can choose whether you want to show divergences.
Intrabar Timeframe
This is the intrabar timeframe that will be used to calculate volume delta using intrabar inspection on historical bars. You can choose between four modes. The three "Auto-steps" modes calculate, from the chart's timeframe, the intrabar timeframe where the said number of intrabars will make up the dilation of chart bars. Adjustments are made for non-24x7 markets. "Fixed" mode allows you to select the intrabar timeframe you want. Checking the "Show TF" box will display in the lower-right corner the intrabar timeframe used at any given moment. The proper selection of the intrabar timeframe is important. It must achieve maximal granularity to produce precise results while not unduly slowing down calculations, or worse, causing runtime errors. Note that historical depth will vary with the intrabar timeframe. The smaller the timeframe, the shallower historical plots you will be.
Markers
Markers appear when the required condition has been confirmed on a closed bar. The configuration of the markers when you create an alert is what determines when the alert will trigger. Five markers are available:
• Balances Agreement : All five balances are either bullish or bearish.
• Double Bumps : A double bump is two consecutive up/down bars with +/‒ volume delta, and rising Buy/Sell volume above its average.
• Divergence confirmations : A divergence is confirmed up/down when the chosen balance is up/down on the previous bar when that bar was down/up, and this bar is up/down.
• Balance Shifts : These are bull/bear transitions of the selected signal.
• Marker Bias Shifts : Marker bias shifts occur when it crosses into bull/bear territory.
Periods
Allows control over the periods of the different moving averages used to calculate the balances.
Volume Discrepancies
Stock exchanges do not report the same volume for intraday and daily (or higher) resolutions. Other variations in how volume information is reported can also occur in other markets, namely Forex, where volume irregularities can even occur between different intraday timeframes. This will cause discrepancies between the total volume on the bar at the chart's timeframe, and the total volume calculated by adding the volume of the intrabars in that bar's dilation. This does not necessarily invalidate the volume delta information calculated from intrabars, but it tells us that we are using partial volume data. A mechanism to detect chart vs intrabar timeframe volume discrepancies is provided. It allows you to define a threshold percentage above which the background will indicate a difference has been detected.
Other Settings
You can control here the display of the gray dot reminder on realtime bars, and the display of error messages if you are using a chart timeframe that is not greater than the fixed intrabar timeframe, when you use that mode. Disabling the message can be useful if you only use realtime mode at chart timeframes that do not support intrabar inspection.
█ RAMBLINGS
On Volume Delta
Volume is arguably the best complement to interpret price action, and I consider volume delta to be the most effective way of processing volume information. In periods of low-volatility price consolidations, volume will typically also be lower than normal, but slight imbalances in the trend of the buy/sell volume balance can sometimes help put early odds on the direction of the break from consolidation. Additionally, the progression of the volume imbalance can help determine the proximity of the breakout. I also find volume delta and the number of divergences very useful to evaluate the strength of trends. In trends, I am looking for "slow and steady", i.e., relatively low volatility and pauses where price action doesn't look like world affairs are being reassessed. In my personal mythology, this type of trend is often more resilient than high-volatility breakouts, especially when volume balance confirms the general agreement of traders signaled by the low-volatility usually accompanying this type of trend. The volume action on pauses will often help me decide between aggressively taking profits, tightening a stop or going for a longer-term movement. As for reversals, they generally occur in high-volatility areas where entering trades is more expensive and riskier. While the identification of counter-trend reversals fascinates many traders to no end, they represent poor opportunities in my view. Volume imbalances often precede reversals, but I prefer to use volume delta information to identify the areas following reversals where I can confirm them and make relatively low-cost entries with better odds.
On "Buy/Sell" Volume
Buying or selling volume are misnomers, as every unit of volume transacted is both bought and sold by two different traders. While this does not keep me from using the terms, there is no such thing as “buy only” or “sell only” volume. Trader lingo is riddled with peculiarities.
Divergences
The divergence detection method used here relies on a difference between the direction of a signal and the polarity (up/down) of a chart bar. When using the default "On Bar Balance" to detect divergences, however, only the bar's volume delta is used. You may wonder how there can be divergences between buying/selling volume information and price movement on one bar. This will sometimes be due to the calculation's shortcomings, but divergences may also occur in instances where because of order book structure, it takes less volume to increase the price of an asset than it takes to decrease it. As usual, divergences are points of interest because they reveal imbalances, which may or may not become turning points. To your pattern-hungry brain, the divergences displayed by this indicator will — as they do on other indicators — appear to often indicate turnarounds. My opinion is that reality is generally quite sobering and I have no reliable information that would tend to prove otherwise. Exercise caution when using them. Consequently, I do not share the overwhelming enthusiasm of traders in identifying bullish/bearish divergences. For me, the best course of action when a divergence occurs is to wait and see what happens from there. That is the rationale underlying how my divergence levels work; they take note of a signal's level when a divergence occurs, and it's the signal's behavior from that point on that determines if the post-divergence action is bullish/bearish.
Superfluity
In "The Bed of Procrustes", Nassim Nicholas Taleb writes: To bankrupt a fool, give him information . This indicator can display lots of information. While learning to use a new indicator inevitably requires an adaptation period where we put it through its paces and try out all its options, once you have become used to it and decide to adopt it, rigorously eliminate the components you don't use and configure the remaining ones so their visual prominence reflects their relative importance in your analysis. I tried to provide flexible options for traders to control this indicator's visuals for that exact reason — not for window dressing.
█ LIMITATIONS
• This script uses a special characteristic of the `security()` function allowing the inspection of intrabars — which is not officially supported by TradingView.
It has the advantage of permitting a more robust calculation of volume delta than other methods on historical bars, but also has its limits.
• Intrabar inspection only works on some chart timeframes: 3, 5, 10, 15 and 30 minutes, 1, 2, 3, 4, 6, and 12 hours, 1 day, 1 week and 1 month.
The script’s code can be modified to run on other resolutions.
• When the difference between the chart’s timeframe and the intrabar timeframe is too great, runtime errors will occur. The Auto-Steps selection mechanisms should avoid this.
• All volume is not created equally. Its source, components, quality and reliability will vary considerably with sectors and instruments.
The higher the quality, the more reliably volume delta information can be used to guide your decisions.
You should make it your responsibility to understand the volume information provided in the data feeds you use. It will help you make the most of volume delta.
█ NOTES
For traders
• The Data Window shows key values for the indicator.
• While this indicator displays some of the same information calculated in my Delta Volume Columns ,
I have elected to make it a separate publication so that traders continue to have a simpler alternative available to them. Both code bases will continue to evolve separately.
• All gradients used in this indicator determine their brightness intensities using advances/declines in the signal—not their relative position in a pre-determined scale.
• Volume delta being relative, by nature, it is particularly well-suited to Forex markets, as it filters out quite elegantly the cyclical volume data characterizing the sector.
If you are interested in volume delta, consider having a look at my other "Delta Volume" indicators:
• Delta Volume Realtime Action displays realtime volume delta and tick information on the chart.
• Delta Volume Candles builds volume delta candles on the chart.
• Delta Volume Columns is a simpler version of this indicator.
For coders
• I use the `f_c_gradientRelativePro()` from the PineCoders Color Gradient Framework to build my gradients.
This function has the advantage of allowing begin/end colors for both the bull and bear colors. It also allows us to define the number of steps allowed for each gradient.
I use this to modulate the gradients so they perform optimally on the combination of the signal used to calculate advances/declines,
but also the nature of the visual component the gradient applies to. I use fewer steps for choppy signals and when the gradient is used on discrete visual components
such as volume columns or chart bars.
• I use the PineCoders Coding Conventions for Pine to write my scripts.
• I used functions modified from the PineCoders MTF Selection Framework for the selection of timeframes.
█ THANKS TO:
— The devs from TradingView's Pine and other teams, and the PineCoders who collaborate with them. They are doing amazing work,
and much of what this indicator does could not be done without their recent improvements to Pine.
— A guy called Kuan who commented on a Backtest Rookies presentation of their Volume Profile indicator using a `for` loop.
This indicator started from the intrabar inspection technique illustrated in Kuan's snippet.
— theheirophant , my partner in the exploration of the sometimes weird abysses of `security()`’s behavior at intrabar timeframes.
— midtownsk8rguy , my brilliant companion in mining the depths of Pine graphics.
חפש סקריפטים עבור "volume profile"
Simplified Market ProfileVolume Bins: This script divides the price range into num_bins equal price levels. Each bin holds the cumulative volume for that price range.
Profile Length: The number of past bars that the profile considers for building the volume histogram.
Bin Size: The price range between bins is determined by dividing the difference between the highest and lowest prices over the specified range.
Volume Calculation: The script iterates over each bar within the specified range, determining which price bin the bar’s volume should be added to.
Plotting: The script visualizes the volume profile as lines plotted horizontally at different price levels, with thickness proportional to the volume traded at that level.
CVD - Cumulative Volume Delta (Chart)█ OVERVIEW
This indicator displays cumulative volume delta (CVD) as an on-chart oscillator. It uses intrabar analysis to obtain more precise volume delta information compared to methods that only use the chart's timeframe.
The core concepts in this script come from our first CVD indicator , which displays CVD values as plot candles in a separate indicator pane. In this script, CVD values are scaled according to price ranges and represented on the main chart pane.
█ CONCEPTS
Bar polarity
Bar polarity refers to the position of the close price relative to the open price. In other words, bar polarity is the direction of price change.
Intrabars
Intrabars are chart bars at a lower timeframe than the chart's. Each 1H chart bar of a 24x7 market will, for example, usually contain 60 bars at the lower timeframe of 1min, provided there was market activity during each minute of the hour. Mining information from intrabars can be useful in that it offers traders visibility on the activity inside a chart bar.
Lower timeframes (LTFs)
A lower timeframe is a timeframe that is smaller than the chart's timeframe. This script utilizes a LTF to analyze intrabars, or price changes within a chart bar. The lower the LTF, the more intrabars are analyzed, but the less chart bars can display information due to the limited number of intrabars that can be analyzed.
Volume delta
Volume delta is a measure that separates volume into "up" and "down" parts, then takes the difference to estimate the net demand for the asset. This approach gives traders a more detailed insight when analyzing volume and market sentiment. There are several methods for determining whether an asset's volume belongs in the "up" or "down" category. Some indicators, such as On Balance Volume and the Klinger Oscillator , use the change in price between bars to assign volume values to the appropriate category. Others, such as Chaikin Money Flow , make assumptions based on open, high, low, and close prices. The most accurate method involves using tick data to determine whether each transaction occurred at the bid or ask price and assigning the volume value to the appropriate category accordingly. However, this method requires a large amount of data on historical bars, which can limit the historical depth of charts and the number of symbols for which tick data is available.
In the context where historical tick data is not yet available on TradingView, intrabar analysis is the most precise technique to calculate volume delta on historical bars on our charts. This indicator uses intrabar analysis to achieve a compromise between simplicity and accuracy in calculating volume delta on historical bars. Our Volume Profile indicators use it as well. Other volume delta indicators in our Community Scripts , such as the Realtime 5D Profile , use real-time chart updates to achieve more precise volume delta calculations. However, these indicators aren't suitable for analyzing historical bars since they only work for real-time analysis.
This is the logic we use to assign intrabar volume to the "up" or "down" category:
• If the intrabar's open and close values are different, their relative position is used.
• If the intrabar's open and close values are the same, the difference between the intrabar's close and the previous intrabar's close is used.
• As a last resort, when there is no movement during an intrabar and it closes at the same price as the previous intrabar, the last known polarity is used.
Once all intrabars comprising a chart bar are analyzed, we calculate the net difference between "up" and "down" intrabar volume to produce the volume delta for the chart bar.
█ FEATURES
CVD resets
The "cumulative" part of the indicator's name stems from the fact that calculations accumulate during a period of time. By periodically resetting the volume delta accumulation, we can analyze the progression of volume delta across manageable chunks, which is often more useful than looking at volume delta accumulated from the beginning of a chart's history.
You can configure the reset period using the "CVD Resets" input, which offers the following selections:
• None : Calculations do not reset.
• On a fixed higher timeframe : Calculations reset on the higher timeframe you select in the "Fixed higher timeframe" field.
• At a fixed time that you specify.
• At the beginning of the regular session .
• On trend changes : Calculations reset on the direction change of either the Aroon indicator, Parabolic SAR , or Supertrend .
• On a stepped higher timeframe : Calculations reset on a higher timeframe automatically stepped using the chart's timeframe and following these rules:
Chart TF HTF
< 1min 1H
< 3H 1D
<= 12H 1W
< 1W 1M
>= 1W 1Y
Specifying intrabar precision
Ten options are included in the script to control the number of intrabars used per chart bar for calculations. The greater the number of intrabars per chart bar, the fewer chart bars can be analyzed.
The first five options allow users to specify the approximate amount of chart bars to be covered:
• Least Precise (Most chart bars) : Covers all chart bars by dividing the current timeframe by four.
This ensures the highest level of intrabar precision while achieving complete coverage for the dataset.
• Less Precise (Some chart bars) & More Precise (Less chart bars) : These options calculate a stepped LTF in relation to the current chart's timeframe.
• Very precise (2min intrabars) : Uses the second highest quantity of intrabars possible with the 2min LTF.
• Most precise (1min intrabars) : Uses the maximum quantity of intrabars possible with the 1min LTF.
The stepped lower timeframe for "Less Precise" and "More Precise" options is calculated from the current chart's timeframe as follows:
Chart Timeframe Lower Timeframe
Less Precise More Precise
< 1hr 1min 1min
< 1D 15min 1min
< 1W 2hr 30min
> 1W 1D 60min
The last five options allow users to specify an approximate fixed number of intrabars to analyze per chart bar. The available choices are 12, 24, 50, 100, and 250. The script will calculate the LTF which most closely approximates the specified number of intrabars per chart bar. Keep in mind that due to factors such as the length of a ticker's sessions and rounding of the LTF, it is not always possible to produce the exact number specified. However, the script will do its best to get as close to the value as possible.
As there is a limit to the number of intrabars that can be analyzed by a script, a tradeoff occurs between the number of intrabars analyzed per chart bar and the chart bars for which calculations are possible.
Display
This script displays raw or cumulative volume delta values on the chart as either line or histogram oscillator zones scaled according to the price chart, allowing traders to visualize volume activity on each bar or cumulatively over time. The indicator's background shows where CVD resets occur, demarcating the beginning of new zones. The vertical axis of each oscillator zone is scaled relative to the one with the highest price range, and the oscillator values are scaled relative to the highest volume delta. A vertical offset is applied to each oscillator zone so that the highest oscillator value aligns with the lowest price. This method ensures an accurate, intuitive visual comparison of volume activity within zones, as the scale is consistent across the chart, and oscillator values sit below prices. The vertical scale of oscillator zones can be adjusted using the "Zone Height" input in the script settings.
This script displays labels at the highest and lowest oscillator values in each zone, which can be enabled using the "Hi/Lo Labels" input in the "Visuals" section of the script settings. Additionally, the oscillator's value on a chart bar is displayed as a tooltip when a user hovers over the bar, which can be enabled using the "Value Tooltips" input.
Divergences occur when the polarity of volume delta does not match that of the chart bar. The script displays divergences as bar colors and background colors that can be enabled using the "Color bars on divergences" and "Color background on divergences" inputs.
An information box in the lower-left corner of the indicator displays the HTF used for resets, the LTF used for intrabars, the average quantity of intrabars per chart bar, and the number of chart bars for which there is LTF data. This is enabled using the "Show information box" input in the "Visuals" section of the script settings.
FOR Pine Script™ CODERS
• This script utilizes `ltf()` and `ltfStats()` from the lower_tf library.
The `ltf()` function determines the appropriate lower timeframe from the selected calculation mode and chart timeframe, and returns it in a format that can be used with request.security_lower_tf() .
The `ltfStats()` function, on the other hand, is used to compute and display statistical information about the lower timeframe in an information box.
• The script utilizes display.data_window and display.status_line to restrict the display of certain plots.
These new built-ins allow coders to fine-tune where a script’s plot values are displayed.
• The newly added session.isfirstbar_regular built-in allows for resetting the CVD segments at the start of the regular session.
• The VisibleChart library developed by our resident PineCoders team leverages the chart.left_visible_bar_time and chart.right_visible_bar_time variables to optimize the performance of this script.
These variables identify the opening time of the leftmost and rightmost visible bars on the chart, allowing the script to recalculate and draw objects only within the range of visible bars as the user scrolls.
This functionality also enables the scaling of the oscillator zones.
These variables are just a couple of the many new built-ins available in the chart.* namespace.
For more information, check out this blog post or look them up by typing "chart." in the Pine Script™ Reference Manual .
• Our ta library has undergone significant updates recently, including the incorporation of the `aroon()` indicator used as a method for resetting CVD segments within this script.
Revisit the library to see more of the newly added content!
Look first. Then leap.
Delta Volume Channels [LucF]█ OVERVIEW
This indicator displays on-chart visuals aimed at making the most of delta volume information. It can color bars and display two channels: one for delta volume, another calculated from the price levels of bars where delta volume divergences occur. Markers and alerts can also be configured using key conditions, and filtered in many different ways. The indicator caters to traders who prefer chart visuals over raw values. It will work on historical bars and in real time, using intrabar analysis to calculate delta volume in both conditions.
█ CONCEPTS
Delta Volume
The volume delta concept divides a bar's volume in "up" and "down" volumes. The delta is calculated by subtracting down volume from up volume. Many calculation techniques exist to isolate up and down volume within a bar. The simplest techniques use the polarity of interbar price changes to assign their volume to up or down slots, e.g., On Balance Volume or the Klinger Oscillator . Others such as Chaikin Money Flow use assumptions based on a bar's OHLC values. The most precise calculation method uses tick data and assigns the volume of each tick to the up or down slot depending on whether the transaction occurs at the bid or ask price. While this technique is ideal, it requires huge amounts of data on historical bars, which usually limits the historical depth of charts and the number of symbols for which tick data is available.
This indicator uses intrabar analysis to achieve a compromise between the simplest and most precise methods of calculating volume delta. In the context where historical tick data is not yet available on TradingView, intrabar analysis is the most precise technique to calculate volume delta on historical bars on our charts. TradingView's Volume Profile built-in indicators use it, as do the CVD - Cumulative Volume Delta Candles and CVD - Cumulative Volume Delta (Chart) indicators published from the TradingView account . My Volume Delta Columns Pro indicator also uses intrabar analysis. Other volume delta indicators such as my Realtime 5D Profile use realtime chart updates to achieve more precise volume delta calculations. Indicators of that type cannot be used on historical bars however; they only work in real time.
This is the logic I use to assign intrabar volume to up or down slots:
• If the intrabar's open and close values are different, their relative position is used.
• If the intrabar's open and close values are the same, the difference between the intrabar's close and the previous intrabar's close is used.
• As a last resort, when there is no movement during an intrabar and it closes at the same price as the previous intrabar, the last known polarity is used.
Once all intrabars making up a chart bar have been analyzed and the up or down property of each intrabar's volume determined, the up volumes are added and the down volumes subtracted. The resulting value is volume delta for that chart bar, which can be used as an estimate of the buying/selling pressure on an instrument.
Delta Volume Percent (DV%)
This value is the proportion that delta volume represents of the total intrabar volume in the chart bar. Note that on some symbols/timeframes, the total intrabar volume may differ from the chart's volume for a bar, but that will not affect our calculations since we use the total intrabar volume.
Delta Volume Channel
The DV channel is the space between two moving averages: the reference line and a DV%-weighted version of that reference. The reference line is a moving average of a type, source and length which you select. The DV%-weighted line uses the same settings, but it averages the DV%-weighted price source.
The weight applied to the source of the reference line is calculated from two values, which are multiplied: DV% and the relative size of the bar's volume in relation to previous bars. The effect of this is that DV% values on bars with higher total volume will carry greater weight than those with lesser volume.
The DV channel can be in one of four states, each having its corresponding color:
• Bull (teal): The DV%-weighted line is above the reference line.
• Strong bull (lime): The bull condition is fulfilled and the bar's close is above the reference line and both the reference and the DV%-weighted lines are rising.
• Bear (maroon): The DV%-weighted line is below the reference line.
• Strong bear (pink): The bear condition is fulfilled and the bar's close is below the reference line and both the reference and the DV%-weighted lines are falling.
Divergences
In the context of this indicator, a divergence is any bar where the slope of the reference line does not match that of the DV%-weighted line. No directional bias is assigned to divergences when they occur.
Divergence Channel
The divergence channel is the space between two levels (by default, the bar's low and high ) saved when divergences occur. When price has breached a channel and a new divergence occurs, a new channel is created. Until that new channel is breached, bars where additional divergences occur will expand the channel's levels if the bar's price points are outside the channel.
Prices breaches of the divergence channel will change its state. Divergence channels can be in one of five different states:
• Bull (teal): Price has breached the channel to the upside.
• Strong bull (lime): The bull condition is fulfilled and the DV channel is in the strong bull state.
• Bear (maroon): Price has breached the channel to the downside.
• Strong bear (pink): The bear condition is fulfilled and the DV channel is in the strong bear state.
• Neutral (gray): The channel has not been breached.
█ HOW TO USE THE INDICATOR
Load the indicator on an active chart (see here if you don't know how).
The default configuration displays:
• The DV channel, without the reference or DV%-weighted lines.
• The Divergence channel, without its level lines.
• Bar colors using the state of the DV channel.
The default settings use an Arnaud-Legoux moving average on the close and a length of 20 bars. The DV%-weighted version of it uses a combination of DV% and relative volume to calculate the ultimate weight applied to the reference. The DV%-weighted line is capped to 5 standard deviations of the reference. The lower timeframe used to access intrabars automatically adjusts to the chart's timeframe and achieves optimal balance between the number of intrabars inspected in each chart bar, and the number of chart bars covered by the script's calculations.
The Divergence channel's levels are determined using the high and low of the bars where divergences occur. Breaches of the channel require a bar's low to move above the top of the channel, and the bar's high to move below the channel's bottom.
No markers appear on the chart; if you want to create alerts from this script, you will need first to define the conditions that will trigger the markers, then create the alert, which will trigger on those same conditions.
To learn more about how to use this indicator, you must understand the concepts it uses and the information it displays, which requires reading this description. There are no videos to explain it.
█ FEATURES
The script's inputs are divided in four sections: "DV channel", "Divergence channel", "Other Visuals" and "Marker/Alert Conditions". The first setting is the selection method used to determine the intrabar precision, i.e., how many lower timeframe bars (intrabars) are examined in each chart bar. The more intrabars you analyze, the more precise the calculation of DV% results will be, but the less chart coverage can be covered by the script's calculations.
DV Channel
Here, you control the visibility and colors of the reference line, its weighted version, and the DV channel between them.
You also specify what type of moving average you want to use as a reference line, its source and length. This acts as the DV channel's baseline. The DV%-weighted line is also a moving average of the same type and length as the reference line, except that it will be calculated from the DV%-weighted source used in the reference line. By default, the DV%-weighted line is capped to five standard deviations of the reference line. You can change that value here. This section is also where you can disable the relative volume component of the weight.
Divergence Channel
This is where you control the appearance of the divergence channel and the key price values used in determining the channel's levels and breaching conditions. These choices have an impact on the behavior of the channel. More generous level prices like the default low and high selection will produce more conservative channels, as will the default choice for breach prices.
In this section, you can also enable a mode where an attempt is made to estimate the channel's bias before price breaches the channel. When it is enabled, successive increases/decreases of the channel's top and bottom levels are counted as new divergences occur. When one count is greater than the other, a bull/bear bias is inferred from it.
Other Visuals
You specify here:
• The method used to color chart bars, if you choose to do so.
• The display of a mark appearing above or below bars when a divergence occurs.
• If you want raw values to appear in tooltips when you hover above chart bars. The default setting does not display them, which makes the script faster.
• If you want to display an information box which by default appears in the lower left of the chart.
It shows which lower timeframe is used for intrabars, and the average number of intrabars per chart bar.
Marker/Alert Conditions
Here, you specify the conditions that will trigger up or down markers. The trigger conditions can include a combination of state transitions of the DV and the divergence channels. The triggering conditions can be filtered using a variety of conditions.
Configuring the marker conditions is necessary before creating an alert from this script, as the alert will use the marker conditions to trigger.
Markers only appear on bar closes, so they will not repaint. Keep in mind, when looking at markers on historical bars, that they are positioned on the bar when it closes — NOT when it opens.
Raw values
The raw values calculated by this script can be inspected using a tooltip and the Data Window. The tooltip is visible when you hover over the top of chart bars. It will display on the last 500 bars of the chart, and shows the values of DV, DV%, the combined weight, and the intermediary values used to calculate them.
█ INTERPRETATION
The aim of the DV channel is to provide a visual representation of the buying/selling pressure calculated using delta volume. The simplest characteristic of the channel is its bull/bear state. One can then distinguish between its bull and strong bull states, as transitions from strong bull to bull states will generally happen when buyers are losing steam. While one should not infer a reversal from such transitions, they can be a good place to tighten stops. Only time will tell if a reversal will occur. One or more divergences will often occur before reversals.
The nature of the divergence channel's design makes it particularly adept at identifying consolidation areas if its settings are kept on the conservative side. A gray divergence channel should usually be considered a no-trade zone. More adventurous traders can use the DV channel to orient their trade entries if they accept the risk of trading in a neutral divergence channel, which by definition will not have been breached by price.
If your charts are already busy with other stuff you want to hold on to, you could consider using only the chart bar coloring component of this indicator:
At its simplest, one way to use this indicator would be to look for overlaps of the strong bull/bear colors in both the DV channel and a divergence channel, as these identify points where price is breaching the divergence channel when buy/sell pressure is consistent with the direction of the breach. I have highlighted all those points in the chart below. Not all of them would have produced profitable trades, but nothing is perfect in the markets. Also, keep in mind that the circles identify the visual you would be looking for — not the trade's entry level.
█ LIMITATIONS
• The script will not work on symbols where no volume is available. An error will appear when that is the case.
• Because a maximum of 100K intrabars can be analyzed by a script, a compromise is necessary between the number of intrabars analyzed per chart bar
and chart coverage. The more intrabars you analyze per chart bar, the less coverage you will obtain.
The setting of the "Intrabar precision" field in the "DV channel" section of the script's inputs
is where you control how the lower timeframe is calculated from the chart's timeframe.
█ NOTES
Volume Quality
If you use volume, it's important to understand its nature and quality, as it varies with sectors and instruments. My Volume X-ray indicator is one way you can appraise the quality of an instrument's intraday volume.
For Pine Script™ Coders
• This script uses the new overload of the fill() function which now makes it possible to do vertical gradients in Pine. I use it for both channels displayed by this script.
• I use the new arguments for plot() 's `display` parameter to control where the script plots some of its values,
namely those I only want to appear in the script's status line and in the Data Window.
• I wrote my script using the revised recommendations in the Style Guide from the Pine v5 User Manual.
█ THANKS
To PineCoders . I have used their lower_tf library in this script, to manage the calculation of the LTF and intrabar stats, and their Time library to convert a timeframe in seconds to a printable form for its display in the Information box.
To TradingView's Pine Script™ team. Their innovations and improvements, big and small, constantly expand the boundaries of the language. What this script does would not have been possible just a few months back.
And finally, thanks to all the users of my scripts who take the time to comment on my publications and suggest improvements. I do not reply to all but I do read your comments and do my best to implement your suggestions with the limited time that I have.
Bitcoin Stalemate IndicatorThe Bitcoin Stalemate Indicator examines periods in the market defined by a combination of high volume and low price volatility. These periods are a bit like a tug-of-war with both sides applying a lot of force but the rope moving very little. Periods of high volume and low volatility suggest both sides of the trade are stuck in a stalemate. This indicator may be useful in identifying psychologically important price levels.
The mechanics of the indicator are fairly simple: the indicator takes the volume and divides it by the candle’s size over it’s close for that same period.
volume / ((high - low) / close)
Candles that move very little but with high volume will produce higher reads and vice versa. Finally a smoothing average is applied to clean up the noise.
Volume profiles from the top 6 exchanges are averaged in order to avoid a single exchange’s popularity acting as an overriding factor. Single exchanges can be isolated but are of lesser use. Heat map functionality is only active when all exchanges are selected.
Market Profile Fixed ViewSome instruments does not provide any volume information, therefore, as a fixed volume profile user, I needed a fixed market profile indicator to use the same principles, regardless of whether the volumes are available or not.
This script draws a market profile histogram corresponding to price variations within a specific duration, you only need to specify Start and End date/time values to see the histogram on your chart.
Details
Two lines corresponding to highest/lowest prices are displayed around the histogram
The redline corresponds to the POC (point of control)
Options
Start calculation
End calculation
Bars number (histogram resolution, currently locked to a max value of 50 bars)
Display side/Width (allows to modify size of bars, to the left or to the right)
Bars/Borders/POC Color customization
Notes
This script will probably be updated (to add VAH/VAL zones, and maybe other options). However, some common market profile attributes have not been implemented yet since I don't really use them)
TIL Volume by Price SRTrading Indicator Lab's Volume by Price SR is a volume-based indicator for TradingView that reveals the strongest (and weakest) support and resistance levels in the chart among 12 price zones within a given period.
How It Works
The Volume by Price indicator uses a spectrum of blue to red colors to differentiate the strength of the volume within a price range for each bar. Think of it as a running volume profile with 12 price zones.
For each bar, the indicator calculates the rank of each price zone from the one that has the least number of volume to the highest within a given length of bars. Price zones that have less volume count are assigned colors that are closer to blue while price zones that have higher volume appear red. The indicator also marks the highest and lowest price levels in the rank with a red and blue dot which correspond to the same color code. The indicator repeats this in the next bar up to the last until it creates a stream of 12 lines that visually represent the gradual shift of volume strength in the price axis.
How to Use
The Volume by Price SR indicator is simple and can be used primarily to gauge support and resistance. Red lines represent price levels where there is a history of higher volume within the period, which also act as good support/resistance levels where price is more likely to be tested or bounce off.
As it can also be seen as a running volume profile indicator, the red and blue dots in each bar can be considered as high volume nodes (HVN) and low volume nodes (LVN) respectively. Though the calculation of the volume profile is continuous, the HVN and LVN dots can often appear consecutively or in a series within a single price level. The price tends to linger around or test lines that has the red dot (HVN). Meanwhile price rarely cross lines with the blue dot (LVN) or not spend as much time in these areas compared to other levels.
The height of the 12 price zones is determined by the difference between the highest high and lowest low of the period which can be useful in visualizing the chart's dynamic price range.
Inputs
- Length - sets the length of the period the indicator calculates for each bar
- Line Thickness - sets the thickness of the 12 lines all at once
- Dot Size - sets the size of the HVN and LVN dots
Multi Time Frame Trend, Volume and Momentum ProfileWHAT DOES THIS INDICATOR DO?
I created this indicator to address some of the significant inconveniences when analyzing a security, such as continually switching between different time frames to determine the trend and potential pullbacks, adding volume or volume-derived indicators, and finally, something that would help me determine the strength of the trend (maybe two additional indicators here). So I decided to code this all-in-one indicator that you can add multiple times to your chart depending on the settings you want to use, or just optimize the parameters for the particular asset and then switch between the options.
As the name suggests, it consists of three main sections - Trend , Volume , and Momentum . You have complete control over the parameters, including the Time Frames you want to use for each one (they can be different). So, let me explain each section in more detail.
HOW DOES THE INDICATOR WORK?
1. Trend Settings
In order to determine the trend, you need to set up two Moving Averages. You have a wide choice here - SMA, EMA, WMA, RMA, HMA, DEMA, TEMA, VWMA, and ALMA. Since the indicator does not plot the moving averages on the chart, I strongly suggest using this indicator along with the free "Trend Indicator for Directional Trading(main)" , which you can find in the Public Library. Once you set up the Trend Resolution, the Types of MAs, and their lengths, the indicator will generate a histogram of their convergences and divergences.
The change in colors should help you more easily determine the trend:
a) Bright Green - bull trend and price trending up (a good place to open long)
b) Dark Green - bull trend and price trending down (stay flat or open a long position with great caution)
c) Bright Red - bear trend and price trending down (a good place to open short)
d) Dark Red - bear trend and price trending up (stay flat or open a short position with great caution)
e) In addition, you can change the color palette to reflect the bull/bear trend momentum by scrolling to the bottom and selecting "Color Based on Bull/Bear Momentum", but I will discuss this in more detail below.
This part of the indicator is useful for opening a trade in the direction of the trend or for spotting a potential divergence. Both cases are illustrated below.
2. Volume Settings
The calculations for this part of the indicator are partially taken from "Multi Time Frame Effective Volume Profile" . I will quickly outline the specifics here, but if you want a more thorough understanding of how it works, please check the description of the MTF Effective Volume Profile indicator .
You have three elements with the following default settings - Resolution (5-min), Lookback (100), and Average (1). This means that the indicator will analyze the last one hundred 5-min bars and will plot a sum of only those that are at least 1 times bigger than the average. Those that are smaller than the average will be left out from the calculation. What you get is a trend line showing you accumulation/distribution based on modified volume parameters.
This part of the indicator is useful for spotting exhaustions and increased buying/selling volume that is opposite to the price trend. As you will see in the picture below, in frame 1 the selling pressure is decreasing, while buying volume is increasing. At one point supply dries out and the bulls take control, thus reverting the price. In frame 2, however, you can see that the higher high is not met with nearly as much buying volume as in the previous peak, showing that the bulls are exhausted and maybe a trend change will follow or at the very least that the bull trend will take a break.
3. Momentum Settings
The final part is an RSI smoothed through a Moving Average with the addition of some minor optimizations. Thus, the parameters you have to configure here aside from the resolution are the RSI length, the moving average that will be used, and its length. Out of the three, this is the most lagging component, but it's also the most accurate one. I must mention that due to the modified nature of this RSI, overbought and oversold levels carry less weight to the trading signals. Rather, pay attention to the change of colors, as they do so when the RSI changes direction based on preset parameters. The picture below shows such instances.
4. Additional Settings
This section consists of 4 elements:
a) Length of Trend - filters out the noise and gives a signal only when the trend becomes more established
b) ADX Threshold - filters out trading ranges and indecision zones when it's not recommended to open a trade
c) Select Analysis - choose what part of the indicator you want to see from a drop-down menu
d) Color Based on Bull/Bear Momentum - a global setting that will override the preset coloring of each indicator and will replace it with colors based on bull/bear strength and momentum - green for bulls, red for bears, and gray for non-trading zones.
The last part of this indicator is a combination of all of the above and is called a Points-Based System . It generates 3 rows of dots that go light green when bull criteria are met, orange when bear criteria are met, or gray when it's neither of the two. When you get a column of 3 green dots you get a buy signal. Similarly, a column of 3 orange dots gives you a sell signal. Grey zones are non-tradeable. It goes without saying that the frequency and quality of the signals you get will almost entirely depend on your settings, so feel free to experiment and adjust the indicator to catch the best moves for the given security.
In terms of indicator adjustments, I have left almost every part open to configuration. That is 15 parameters and 35 adjustable colors.
HOW MUCH DOES THE INDICATOR COST ?
As much as I would like to offer it for free (as some of my other ones), a great deal of work, trading logic, and testing have gone into creating this indicator. More than a few hundred iterations and a few dozen branches were required to reach the end result which is a precise combination of usefulness, simplicity, and practicality. Furthermore, this indicator will continue to be updated and user-requested features that improve its performance will be added.
Disclaimer: The purpose of all indicators is to indicate potential setups, which may lead to profitable results. No indicator is perfect and certainly, no indicator has a 100% success rate. They are subject to flaws, wrongful interpretation, bugs, etc. This indicator makes no exception. It must be used with a sound money management plan that puts the main emphasis on protecting your capital. Please, do not rely solely on any single indicator to make trading decisions instead of you. Indicators are storytellers, not fortune tellers. They help you see the bigger picture, not the future.
To find out more about how to gain access to this indicator, please use the provided information below or just message me. Thank you for your time.
Whispr IQ - Trading SystemWhispr IQ - Trading System
This advanced multi-component indicator combines several powerful analysis tools to provide a comprehensive view of market conditions and potential trading opportunities.
Key Components:
Kernel Regression Ribbon
Institutional Order Flow
Volume Profile
Order Blocks
Swing Points and Liquidity
Naked POC (Point of Control)
Fibonacci Levels
Zig Zag Patterns
Divergence Scanner
Squeeze Bands
How It Works:
Kernel Regression Ribbon
Uses kernel regression to create a smoothed ribbon of price action
Multiple timeframes analyzed to show short, medium and long-term trends
Color coding indicates bullish/bearish bias
Institutional Order Flow
Identifies areas of high volume and potential institutional activity
Highlights order blocks, liquidity levels, and fair value gaps
Helps visualize potential support/resistance zones
Volume Profile
Displays volume distribution at different price levels
Identifies high volume nodes and value areas
Useful for determining potential reversal points
Order Blocks
Highlights significant swing highs/lows with high volume
Indicates potential areas where large players may have placed orders
Useful for identifying key support/resistance levels
Swing Points and Liquidity
Marks major swing highs and lows
Highlights areas of potential liquidity buildup
Helps identify trend changes and potential reversal zones
Naked POC
Shows uncovered Points of Control from volume profile analysis
Indicates areas of high trading activity that price has moved away from
Potential magnet for price to return to
Fibonacci Levels
Plots key Fibonacci retracement and extension levels
Useful for identifying potential support, resistance and targets
Multiple Fibonacci sequences used for confirmation
Zig Zag Patterns
Identifies key swing highs and lows
Filters out minor price movements
Helps visualize overall trend structure
Divergence Scanner
Scans for regular and hidden divergences on multiple indicators
Signals potential trend reversals or continuations
Configurable to scan RSI, MACD, CCI and other oscillators
Squeeze Bands
Identifies periods of low volatility (squeezes)
Signals potential for explosive moves when volatility expands
Based on Bollinger Bands and Keltner Channel relationships
The Whispr IQ system combines all these elements to provide a holistic view of market conditions. Traders can use the various signals and overlays to identify high-probability trade setups, key support/resistance levels, trend direction on multiple timeframes, and potential reversals.
This indicator is designed for experienced traders who can interpret the multiple data points and use them in conjunction with their own analysis and risk management. It's a powerful tool that can enhance trading decisions when used properly as part of a complete trading plan.
Liquidity composition / quantifytools- Overview
Liquidity composition divides each candle into sections that are used to display transaction activity at price. In simple terms, an X-ray through candle is formed, revealing the orderflow that built the candle in greater detail. Liquidity composition consists of two main components, lots and columns. Lots and columns can be used to visualize user specified volume types, currently supporting net volume and volume delta. Lots and columns can be used to visualize same or different volume types, allowing a combination of volume footprint, volume delta footprint and volume profile in one single view. Liquidity composition principally works on any chart, whether that is equities, currencies, cryptocurrencies or commodities, even charts with no volume data (in which case volatility is used to approximate transaction activity). The script also works on any timeframe, from minute charts to monthly charts. Orderflow can be observed in real-time as it develops and none of the indications are repainted.
Example: Displaying same volume types on lots and columns
Example: Displaying different volume types on lots and columns
Liquidity composition supports user specified derivative data, such as point of control(s) and net activity coloring. Derivative data can be calculated based on either net volume or volume delta, resulting in different highlights.
With net volume, volume delta and derivative data in one view, key orderflow events such as delta imbalances, high volume nodes, low volume nodes and point of controls can be used to quickly identify accumulation/distribution, imbalances, unfinished/finished auctions and trapped traders.
Accessing script 🔑
See "Author's instructions" section, found at bottom of the script page.
Key takeaways
- Liquidity composition breaks down transaction activity at price, measured in net volume or volume delta
- Developing activity can be observed real-time, none of the indications are repainted
- Transaction activity is calculated using volumes accrued in lower timeframe price movements
- Lots and columns can be used to display same or different volume types (e.g. volume delta lots and net volume columns) in single view
- Users can specify derivative data such as volume delta POCs, net volume POC and net activity coloring
- For practical guide with practical examples, see last section
Disclaimer
Orderflow data is estimated using lower timeframe price movement. While accurate and useful, it's important to note the calculations are estimations and are not based on orderbook data. Estimates are calculated by allotting volume developing on lower timeframe chart to its respective section based on closing price. Volume delta (difference between buyers/sellers) is calculated by subtracting down move volumes (sell volume) from up move volumes (buy volume). Accuracy of the orderflow estimations largely depends on quality of lower timeframe chart used for calculations, which is why this tool cannot be expected to work accurately on illiquid charts with broken data.
Liquidity composition does not provide a standalone trading strategy or financial advice. It also does not substitute knowing how to trade. Example charts and ideas shown for use cases are textbook examples under ideal conditions, not guaranteed to repeat as they are presented. Liquidity composition should be viewed as one tool providing one kind of evidence, to be used in conjunction with other means of analysis.
- Example charts
Chart #1: BTCUSDT
Chart #2: EURUSD
Chart #3: ES futures
- Calculations
By default, size of sections and lower timeframe accuracy are automatically determined for all charts and timeframes. Number of lower timeframe price moves used for calculating orderflow is kept at fixed value, by default set to 350. Accuracy value dictates how many lower timeframe candles are included in the calculation of volume at price. At 350, the script will always use 350 lower timeframe price movements in calculations (when possible). When calculated dynamic timeframe is less than 1 minute, the script switches to available seconds based timeframes. Minimum dynamic timeframe can be capped to 1 minute (as seconds based timeframes are not available for all plans) or dynamic timeframe can be overridden using an user specified timeframe.
Example: Calculating dynamic lower timeframe
Main chart: 4H / 240 minutes
Accuracy value: 100
Formula: 240 minutes / 100 = 2.4 minutes
Timeframe used for calculations = 2 minutes
Section size is automatically determined based on typical historical candle range, the bigger it is, the bigger the section size as well. Like dynamic timeframe, automatic section size can be manually overridden by user specified size expressed in ticks (minimum price unit). Users can also adjust sensitivity of automatic sizing by setting it higher (smaller sections, more detail and more noise) or lower (less sections, less detail and less noise). Section size and dynamic timeframe can be monitored via metric table.
Volume at price is calculated by allotting volume associated with a lower timeframe price movement to its respective section based on closing price (volume is stored to the section that covers closing price). When used on a chart with no volume data, volatility is used instead to determine likely magnitude of participation. Volume delta (difference between buyers/sellers) is calculated by subtracting down move volumes (sell volume) from up move volumes (buy volume). Volumes accrued in sections are monitored over a longer period of time to determine a "normal" amount of activity, which is then used to normalize accrued volumes by benchmarking them against historical values.
Volume values displayed on the left side represent how close or far volume traded at given section is to an extreme, represented by value of 10 . The more value exceeds 10, the more extreme transaction activity is historically. The lesser the value, the less extreme (and therefore more typical) transaction activity is. Users can adjust sensitivity of volume extreme threshold, either by increasing it (more transaction activity is needed to constitute an extreme) or decreasing it (less transaction activity is needed to constitute an extreme).
Example: Interpreting volume scale
0 = Very little to no transaction activity compared to historical values
5 = Transaction activity equal to average historical values
10 = Transaction activity equal to an extreme in historical values
10+ = The more transaction activity exceeds value of 10, the more extreme it is historically
Accuracy of orderflow data largely depends on quality of lower timeframe data used in calculations. Sometimes quality of underlying lower timeframe data is insufficient due to suboptimal accuracy or broken lower timeframe data, usually caused by illiquid charts with gaps and inconsistent values. Therefore, one should always ensure the usage of most liquid chart available with no gaps in lower timeframe data. To combat poor orderflow data, a simple data quality check is conducted by calculating percentage of sections with volume data out of all available sections. Idea behind the test is to capture instances where unusual amount of sections are completely empty, most likely due to data gaps in LTF chart. E.g. 90% of sections hold some volume data, 10% are completely empty = 90% data quality score.
Data quality score should be viewed as a metric alerting when detail of underlying data is insufficient to consider accurate. When data quality score is slightly below threshold, lower timeframe chart used for calculations is likely fine, but accuracy value is too low. In this case, one should increase accuracy value or manually override used timeframe with a smaller one. When data quality score is well below threshold, lower timeframe chart used for calculations is likely broken and cannot be fixed. In this case, one should look for alternative charts with more reliable data (e.g. ES1! -> SPY, BITSTAMP:BTCUSD -> BINANCE:BTCUSDT).
Example : When insufficient data quality scores can/cannot be fixed
- Derivative data
Point of control
Point of control, referring to point in price where transaction activity is highest, can be calculated based on the volume type of lots or columns (based on net volume or volume delta). Depending on the calculation basis, displayed point of controls will vary. POC calculated based on net volume is no different from traditional POC, it is simply the section with highest amount of transaction activity, marked with an X. When calculating POC based on volume delta, the script will highlight two point of controls, named leading and losing point of control . Leading POC refers to lot with highest amount of volume delta, marked with an X. If leading POC was net buy volume, losing POC is marked on section with highest net sell volume, marked with S respectfully. Same logic applies in vice versa, if leading POC is net sell volume, losing POC is marked on highest buy volume section, using the letter B.
Net activity
Similarly to point of control calculation, net activity can be calculated based on either volume types, lots or columns. When calculating net activity based on net volume, candles will be colorized according to magnitude of total volume traded. When calculating net activity based on volume delta, candles will be colorized according to side with most volume traded (buyers or sellers). Net activity color can be applied on borders or body of a candle.
- Visuals
Lots, columns, candles and POCs can be colorized using a fixed color or a volume based dynamic color, with separate color options for buy side volume, sell side volume and net volume.
Metric table can be offsetted horizontally or vertically from any four corners of the chart, allowing space for tables from other scripts.
Table sizes, label sizes and offsets for visuals are fully customizable using settings menu.
- Practical guide
OHLC data (candles) is a simple condensed visualization of an auction market process. Candles show where price was in the beginning of an auction period (timeframe), the highest/lowest point and where price was at the end of an auction. The core utility of Liquidity composition is being able to view the same auction market process in much greater detail, revealing likely intention, effort and magnitude driving the process. All basic orderflow concepts, such as ones presented by auction market theory can be applied to Liquidity composition as well.
The most obvious and easy to spot use case for orderflow tools is identifying trapped traders/absorption, seen in high transaction activity at the very highs/lows of a candle or even better, at wicks. High participation at wicks can be used to identify forced orders absorbed into limit orders, idea behind being that when high transaction activity is placed at a wick, price went one direction with a lot of participation (high effort) and came right back up (low impact) within the same time period.
Absorption can show itself in many ways:
- Extreme buy volume sections at wick highs or buy side POC at wick highs
- Multiple, clustered high buy volume sections (but not extreme) at wick highs
- Positive net volume delta into a reversal down
- Extreme sell volume sections at wick lows or sell side POC at wick lows
- Multiple, clustered high sell volume sections (but not extreme) at wick lows
- Negative net volume delta into a reversal up
- Extreme net volume sections at or net volume POC at wick highs/lows
- Extreme net volume into a reversal up/down
For accurate analysis, orderflow based events should be viewed in the context of price action. To identify absorption, it's best to look for opportunities where an opposing trend is clearly in place, e.g. absorption into highs on an uptrend, absorption into lows on a downtrend. When price is ranging without a clear trend or there's no opposing trend, extreme activity at an extreme end of a candle might be aggressive participants attempting to initiate a new trend, rather than getting absorbed in the same sense. With enough effort put into pushing price to the opposite direction at overextended price, a shift in trend direction might be near.
Price action based levels are a great way to get context around orderflow events. Simple range highs/lows as a single data point serve as a high probability regimes for reversals, making them a great point of confluence for identifying trapped traders.
Low to zero volume sections can be used to identify points in price with little to no trading, leaving a volume null/void behind. Typically sections like these represent gaps on a lower timeframe chart, which can be used as reference levels for targets and support/resistance.
Net volume can be used for same purposes as above, but for determining general intention of market participants it's a much more suitable tool than volume delta. According to auction market theory, low/no participation is considered to reject prices and high participation is considered to accept prices. With this concept in mind, unfinished auctions occur when participation is high at highs or high at lows, idea behind being that participants are showing willingness and interest to trade at higher or lower prices. Auction is considered finished when the opposite is true, i.e. when participants are not showing willingness to trade at higher/lower prices. In general, direction of unfinished auctions can be expected to continue shortly and direction of unfinished auctions can be expected to hold.
While shape of volume delta and net volume are usually similar, they're not the same thing and do not represent the same event under the hood. Volume delta at 0 does not necessarily mean participation is 0, but can also mean high participation with equal amount of buying and selling. With this distinction in mind, using volume delta and net volume in tandem has the benefit of being able to identify points in price with a lot of up and down price movement packed into a small area, i.e. consolidation. Points in price where price hangs around for an extended period of time can be used to identify levels of interest for re-tests and breakout opportunities.
.srb suiteThe essential suite Indicator.
that are well integrated to ensure visibility of essential items for trading.
it is very cumbersome to put symbol in the Tradingview chart and combine essential individual indicators one by one.
Moreover even with such a combination, the chart is messy and visibility is not good.
This is because each indicator is not designed with the others in mind.
This suite was developed as a composite-solution to that situation, and will make you happy.
designed to work in the same pane with open-source indicator by default.
Recommended visual order ; Back = .srb suite, Front = .srb suite vol & info
individually turn on/off only what you need on the screen.
BTC-agg. Volume
4 BTC-spot & 4 BTC-PERP volume aggregated.
It might helps you don't miss out on important volume flows.
Weighted to spot trading volume when using PERP+spot volume .
If enabled, BTC-agg.Vol automatically applied when selecting BTC-pair.
--> This is used in calculations involving volumes, such as VWAP.
Moving Average
1 x JMA trend ribbon ; Accurately follow short-term trend changes.
3 x EMA ribbon ; zone , not the line.
MA extension line ; It provide high visibility to recognize the direction of the MA.
SPECIAL TOOLS
VWAP with Standard Deviation Bands
VWAP ruler
BB regular (Dev. 2.0, 2.5)
BB Extented (Dev. 2.5, 3.0, 3.5)
Fixed Range Volume Profile ; steamlined one, performace tuned & update.
SPECIAL TOOLS - Auto Fibonacci Retracement - New GUI
'built-in auto FBR ' has been re-born
It shows - retracement Max top/ min bottom ; for higher visibility
It shows - current retracement position ; for higher visibility
The display of the Fib position that exceeds the regular range is auto-determined according to the price.
tradingview | chart setting > Appearance > Top margin 0%, Bottom margin 0% for optimized screen usage
tradingview | chart setting > Appearance > Right margin 57
.srb suite vol & info --> Visual Order > Bring to Front
.srb suite vol & info --> Pin to scale > No scale (Full-screen)
Visual order ; Back = .srb suite, Front = .srb suite vol & info
1. Fib.Retracement core is from tradingview built-in FBR ---> upgrade new-type GUI, and performance tuned.
2. Fixed-range volume-profile core is from the open-source one ---> some update & perf.tuned.
---------------------------------------------------------------------------------------------------------------------------------------
if you have any questions freely contact to me by message on tradingview.
but please understand that responses may be quite late.
Special thanks to all of contributors of community.
The script may be freely distributed under the MIT license.
VPoC per barThis study prints the current bar VPoC as an horizontal line.
It's aimed originally at BTCUSDT pair and 15m timeframe.
HOW IT WORKS
Zoom In mode: This is the default mode.
The study zooms in into the latest 15 1-minute bar candles in order to calculate the 15 minute candle VPoC.
Zoom Out mode: The VPoC from the last n bars from the current timeframe that match desired timeframe is shown on each bar.
In either case you are recommended to click on the '...' button associated to this study
and select 'Visual Order. Bring to Front.' so that it's properly shown in your chart.
HOW IT WORKS - Zoom In mode
Make sure that '(VP) Zoom into the VP timeframe' setting is set to true.
Choose the zoomed in timeframe where to calculate VPoC from thanks to the '(VP) Zoomed timeframe {1 minute}' setting.
Change '(VP) Zoomed in timeframe bars per current timeframe bar {15}' to its appropiated value. You just need to divide the current timeframe minutes per the zoomed in timeframe minutes per bar. E.g. If you are in 60 minute timeframe and you want to zoom in into 5 minute timeframe: 60 / 5 = 12 . You will write 12 here.
HOW IT WORKS - Zoom Out mode
Make sure that '(VP) Zoom into the VP timeframe' setting is set to false.
If you are using the Zoom out mode you might want to set '(VP) Print VPoC price as discrete lines {True}' to false.
Either choose the zoommed out timeframe where to calculate VPoC from thanks to the '(VP) Zoomed timeframe {1 minute}' setting or turn on the '(VP) Use number of bars (not VP timeframe)' setting in order to use '(VP) Number of bars {100}' as a custom number of bars.
WARNING - Zoom In mode last bar
The way that PineScript handles security function in last bar might result on the last bar not being accurate enough.
SETTINGS
__ SETTINGS - Volume Profile
(VP) Zoomed timeframe {1 minute}: Timeframe in which to zoom in or zoom out to calculate an accurate VPoC for the current timeframe.
(VP) Zoomed in timeframe bars per current timeframe bar {15}: Check 'HOW IT WORKS - Zoom In mode' above. Note : It is only used in 'Zoom in' mode.
(VP) Number of bars {100}: If 'Use number of bars (not VP timeframe)' is turned on this setting is used to calculate session VPoC. Note : It is only used in 'Zoom out' mode.
(VP) Price levels {24}: Price levels for calculating VPoC.
__ SETTINGS - MAIN TURN ON/OFF OPTIONS
(VP) Print VPoC price {True}: Show VPoC price
(VP) Zoom into the VP timeframe: When set to true the VPoC is calculated by zooming into the lower timeframe. When set to false a higher timeframe (or number of bars) is used.
(VP) Realtime Zoom in (Beta): Enable real time zoom for the last bar. It's beta because it would only work with zoomed in timeframe under 60 minutes. And when ratio between zoomout and zoomin is less than 60. Note : It is only used in 'Zoom in' mode.
(VP) Use number of bars (not VP timeframe): Uses 'Number of bars {100}' setting instead of 'Volume Profile timeframe' setting for calculating session VPoC. Note : It is only used in 'Zoom out' mode.
(VP) Print VPoC price as discrete lines {True}: When set to true the VPoC is shown as an small line in the center of each bar. When set to the false the VPoC line is printed as a normal line.
__ SETTINGS - EXTRA
(VP) VPoC color: Change the VPoC color
(VP) VPoC line width {1}: Change VPoC line width (in pixels).
(VP) Use number of bars (not VP timeframe): Uses 'Number of bars {100}' setting instead of 'Volume Profile timeframe' setting for calculating session VPoC. Note : It is only used in 'Zoom out' mode.
(VP) Print VPoC price as discrete lines {True}: When set to true the VPoC is shown as an small line in the center of each bar. When set to the false the VPoC line is printed as a normal line.
CREDITS
I have reused and adapted some code from
"Poor man's volume profile" study
which it's from TradingView IldarAkhmetgaleev user.
Bar Balance [LucF]Bar Balance extracts the number of up, down and neutral intrabars contained in each chart bar, revealing information on the strength of price movement. It can display stacked columns representing raw up/down/neutral intrabar counts, or an up/down balance line which can be calculated and visualized in many different ways.
WARNING: This is an analysis tool that works on historical bars only. It does not show any realtime information, and thus cannot be used to issue alerts or for automated trading. When realtime bars elapse, the indicator will require a browser refresh, a change to its Inputs or to the chart's timeframe/symbol to recalculate and display information on those elapsed bars. Once a trader understands this, the indicator can be used advantageously to make discretionary trading decisions.
Traders used to work with my Delta Volume Columns Pro will feel right at home in this indicator's Inputs . It has lots of options, allowing it to be used in many different ways. If you value the bar balance information this indicator mines, I hope you will find the time required to master the use of Bar Balance well worth the investment.
█ OVERVIEW
The indicator has two modes: Columns and Line .
Columns
• In Columns mode you can display stacked Up/Down/Neutral columns.
• The "Up" section represents the count of intrabars where `close > open`, "Down" where `close < open` and "Neutral" where `close = open`.
• The Up section always appears above the centerline, the Down section below. The Neutral section overlaps the centerline, split halfway above and below it.
The Up and Down sections start where the Neutral section ends, when there is one.
• The Up and Down sections can be colored independently using 7 different methods.
• The signal line plotted in Line mode can also be displayed in Columns mode.
Line
• Displays a single balance line using a zero centerline.
• A variable number of independent methods can be used to calculate the line (6), determine its color (5), and color the fill (5).
You can thus evaluate the state of 3 different components with this single line.
• A "Divergence Levels" feature will use the line to automatically draw expanding levels on divergence events.
Features available in both modes
• The color of all components can be selected from 15 base colors, with 16 gradient levels used for each base color in the indicator's gradients.
• A zero line can show a 6-state aggregate value of the three main volume balance modes.
• The background can be colored using any of 5 different methods.
• Chart bars can be colored using 5 different methods.
• Divergence and large neutral count ratio events can be shown in either Columns or Line mode, calculated in one of 4 different methods.
• Markers on 6 different conditions can be displayed.
█ CONCEPTS
Intrabar inspection
Intrabar inspection means the indicator looks at lower timeframe bars ( intrabars ) making up a given chart bar to gather its information. If your chart is on a 1-hour timeframe and the intrabar resolution determined by the indicator is 5 minutes, then 12 intrabars will be analyzed for each chart bar and the count of up/down/neutral intrabars among those will be tallied.
Bar Balances and calculation methods
The indicator uses a variety of methods to evaluate bar balance and to derive other calculations from them:
1. Balance on Bar : Uses the relative importance of instant Up and Down counts on the bar.
2. Balance Averages : Uses the difference between the EMAs of Up and Down counts.
3. Balance Momentum : Starts by calculating, separately for both Up and Down counts, the difference between the same EMAs used in Balance Averages and an SMA of double the period used for the EMAs. These differences are then aggregated and finally, a bounded momentum of that aggregate is calculated using RSI.
4. Markers Bias : It sums the bull/bear occurrences of the four previous markers over a user-defined period (the default is 14).
5. Combined Balances : This is the aggregate of the instant bull/bear bias of the three main bar balances.
6. Dual Up/Down Averages : This is a display mode showing the EMA calculated for each of the Up and Down counts.
Interpretation of neutral intrabars
What do neutral intrabars mean? When price does not change during a bar, it can be because there is simply no interest in the market, or because of a perfect balance between buyers and sellers. The latter being more improbable, Bar Balance assumes that neutral bars reveal a lack of interest, which entails uncertainty. That is the reason why the option is provided to interpret ratios of neutral intrabars greater than 50% as divergences. It is also the rationale behind the option to dampen signal lines on the inverse ratio of neutral intrabars, so that zero intrabars do not affect the signal, and progressively larger proportions of neutral intrabars will reduce the signal's amplitude, as the balance calcs using the up/down counts lose significance. The impact of the dampening will vary with markets. Weaker markets such as cryptos will often contain greater numbers of neutral intrabars, so dampening the Line in that sector will have a greater impact than in more liquid markets.
█ FEATURES
1 — Columns
• While the size of the Up/Down columns always represents their respective importance on the bar, their coloring mode is independent. The default setup uses a standard coloring mode where the Up/Down columns over/under the zero line are always in the bull/bear color with a higher intensity for the winning side. Six other coloring modes allow you to pack more information in the columns. When choosing to color the top columns using a bull/bear gradient on Balance Averages, for example, you will end up with bull/bear colored tops. In order for the color of the bottom columns to continue to show the instant bar balance, you can then choose the "Up/Down Ratio on Bar — Dual Solid Colors" coloring mode to make those bars the color of the winning side for that bar.
• Line mode shows only the line, but Columns mode allows displaying the line along with it. If the scale of the line is different than that of the scale of the columns, the line will often appear flat. Traders may find even a flat line useful as its bull/bear colors will be easily distinguishable.
2 — Line
• The default setup for Line mode uses a calculation on "Balance Momentum", with a fill on the longer-term "Balance Averages" and a line color based on the "Markers Bias". With the background set on "Line vs Divergence Levels" and the zero line on the hard-coded "Combined Bar Balances", you have access to five distinct sources of information at a glance, to which you can add divergences, divergences levels and chart bar coloring. This provides powerful potential in displaying bar balance information.
• When no columns are displayed, Line mode can show the full scale of whichever line you choose to calculate because the columns' scale no longer interferes with the line's scale.
• Note that when "Balance on Bar" is selected, the Neutral count is also displayed as a ratio of the balance line. This is the only instance where the Neutral count is displayed in Line mode.
• The "Dual Up/Down Averages" is an exception as it displays two lines: one average for the Up counts and another for the Down counts. This mode will be most useful when Columns are also displayed, as it provides a reference for the top and bottom columns.
3 — Zero Line
The zero line can be colored using two methods, both based on the Combined Balances, i.e., the aggregate of the instant bull/bear bias of the three main bar balances.
• In "Six-state Dual Color Gradient" mode, a dot appears on every bar. Its color reflects the bull/bear state of the Combined Balances, and the dot's brightness reflects the tally of balance biases.
• In "Dual Solid Colors (All Bull/All Bear Only)" a dot only appears when all three balances are either bullish or bearish. The resulting pattern is identical to that of Marker 1.
4 — Divergences
• Divergences are displayed as a small circle at the top of the scale. Four different types of divergence events can be detected. Divergences occur whenever the bull/bear bias of the method used diverges with the bar's price direction.
• An option allows you to include in divergence events instances where the count of neutral intrabars exceeds 50% of the total intrabar count.
• The divergence levels are dynamic levels that automatically build from the line's values on divergence events. On consecutive divergences, the levels will expand, creating a channel. This implementation of the divergence levels corresponds to my view that divergences indicate anomalies, hesitations, points of uncertainty if you will. It excludes any association of a pre-determined bullish/bearish bias to divergences. Accordingly, the levels merely take note of divergence events and mark those points in time with levels. Traders then have a reference point from which they can evaluate further movement. The bull/bear/neutral colors used to plot the levels are also congruent with this view in that they are determined by price's position relative to the levels, which is how I think divergences can be put to the most effective use.
5 — Background
• The background can show a bull/bear gradient on four different calculations. You can adjust its brightness to make its visual importance proportional to how you use it in your analysis.
6 — Chart bars
• Chart bars can be colored using five different methods.
• You have the option of emptying the body of bars where volume does not increase, as does my TLD indicator, the idea behind this being that movement on bars where volume does not increase is less relevant.
7 — Intrabar Resolution
You can choose between three modes. Two of them are automatic and one is manual:
a) Fast, Longer history, Auto-Steps (~12 intrabars) : Optimized for speed and deeper history. Uses an average minimum of 12 intrabars.
b) More Precise, Shorter History Auto-Steps (~24 intrabars) : Uses finer intrabar resolution. It is slower and provides less history. Uses an average minimum of 24 intrabars.
c) Fixed : Uses the fixed resolution of your choice.
Auto-Steps calculations vary for 24/7 and conventional markets in order to achieve the proper target of minimum intrabars.
You can choose to view the intrabar resolution currently used to calculate delta volume. It is the default.
The proper selection of the intrabar resolution is important. It must achieve maximal granularity to produce precise results while not unduly slowing down calculations, or worse, causing runtime errors.
8 — Markers
Six markers are available:
1. Combined Balances Agreement : All three Bar Balances are either bullish or bearish.
2. Up or Down % Agrees With Bar : An up marker will appear when the percentage of up intrabars in an up chart bar is greater than the specified percentage. Conditions mirror to down bars.
3. Divergence confirmations By Price : One of the four types of balance calculations can be used to detect divergences with price. Confirmations occur when the bar following the divergence confirms the balance bias. Note that the divergence events used here do not include neutral intrabar events.
4. Balance Transitions : Bull/bear transitions of the selected balance.
5. Markers Bias Transitions : Bull/bear transitions of the Markers Bias.
6. Divergence Confirmations By Line : Marks points where the line first breaches a divergence level.
Markers appear when the condition is detected, without delay. Since nothing is plotted in realtime, markers do not appear on the realtime bar.
9 — Settings
• Two modes can be selected to dampen the line on the ratio of neutral intrabars.
• A distinct weight can be attributed to the count of the latter half of intrabars, on the assumption that later intrabars may be more important in determining the outcome of chart bars.
• Allows control over the periods of the different moving averages used in calculations.
• The default periods used for the various calculations define the following hierarchy from slow to fast:
Balance Averages: 50,
Balance Momentum: 20,
Dual Up/Down Averages: 20,
Marker Bias: 10.
█ LIMITATIONS
• This script uses a special characteristic of the `security()` function allowing the inspection of intrabars—which is not officially supported by TradingView.
• The method used does not work on the realtime bar—only on historical bars.
• The indicator only works on some chart resolutions: 3, 5, 10, 15 and 30 minutes, 1, 2, 4, 6, and 12 hours, 1 day, 1 week and 1 month. The script’s code can be modified to run on other resolutions, but chart resolutions must be divisible by the lower resolution used for intrabars and the stepping mechanism could require adaptation.
• When using the "Line vs Divergence Levels — Dual Color Gradient" color mode to fill the line, background or chart bars, keep in mind that a line calculation mode must be defined for it to work, as it determines gradients on the movement of the line relative to divergence levels. If the line is hidden, it will not work.
• When the difference between the chart’s resolution and the intrabar resolution is too great, runtime errors will occur. The Auto-Steps selection mechanisms should avoid this.
• Alerts do not work reliably when `security()` is used at intrabar resolutions. Accordingly, no alerts are configured in the indicator.
• The color model used in the indicator provides for fancy visuals that come at a price; when you change values in Inputs , it can take 20 seconds for the changes to materialize. Luckily, once your color setup is complete, the color model does not have a large performance impact, as in normal operation the `security()` calls will become the most important factor in determining response time. Also, once in a while a runtime error will occur when you change inputs. Just making another change will usually bring the indicator back up.
█ RAMBLINGS
Is this thing useful?
I'll let you decide. Bar Balance acts somewhat like an X-Ray on bars. The intrabars it analyzes are no secret; one can simply change the chart's resolution to see the same intrabars the indicator uses. What the indicator brings to traders is the precise count of up/down/neutral intrabars and, more importantly, the calculations it derives from them to present the information in a way that can make it easier to use in trading decisions.
How reliable is Bar Balance information?
By the same token that an up bar does not guarantee that more up bars will follow, future price movements cannot be inferred from the mere count of up/down/neutral intrabars. Price movement during any chart bar for which, let's say, 12 intrabars are analyzed, could be due to only one of those intrabars. One can thus easily see how only relying on bar balance information could be very misleading. The rationale behind Bar Balance is that when the information mined for multiple chart bars is aggregated, it can provide insight into the history behind chart bars, and thus some bias as to the strength of movements. An up chart bar where 11/12 intrabars are also up is assumed to be stronger than the same up bar where only 2/12 intrabars are up. This logic is not bulletproof, and sometimes Bar Balance will stray. Also, keep in mind that balance lines do not represent price momentum as RSI would. Bar Balance calculations have no idea where price is. Their perspective, like that of any historian, is very limited, constrained that it is to the narrow universe of up/down/neutral intrabar counts. You will thus see instances where price is moving up while Balance Momentum, for example, is moving down. When Bar Balance performs as intended, this indicates that the rally is weakening, which does necessarily imply that price will reverse. Occasionally, price will merrily continue to advance on weakening strength.
Divergences
Most of the divergence detection methods used here rely on a difference between the bias of a calculation involving a multi-bar average and a given bar's price direction. When using "Bar Balance on Bar" however, only the bar's balance and price movement are used. This is the default mode.
As usual, divergences are points of interest because they reveal imbalances, which may or may not become turning points. I do not share the overwhelming enthusiasm traders have for the purported ability of bullish/bearish divergences to indicate imminent reversals.
Superfluity
In "The Bed of Procrustes", Nassim Nicholas Taleb writes: To bankrupt a fool, give him information . Bar Balance can display lots of information. While learning to use a new indicator inevitably requires an adaptation period where we put it through its paces and try out all its options, once you have become used to Bar Balance and decide to adopt it, rigorously eliminate the components you don't use and configure the remaining ones so their visual prominence reflects their relative importance in your analysis. I tried to provide flexible options for traders to control this indicator's visuals for that exact reason—not for window dressing.
█ NOTES
For traders
• To avoid misleading traders who don't read script descriptions, the indicator shows nothing in the realtime bar.
• The Data Window shows key values for the indicator.
• All gradients used in this indicator determine their brightness intensities using advances/declines in the signal—not their relative position in a fixed scale.
• Note that because of the way gradients are optimized internally, changing their brightness will sometimes require bringing down the value a few steps before you see an impact.
• Because this indicator does not use volume, it will work on all markets.
For coders
• For those interested in gradients, this script uses an advanced version of the Advance/Decline gradient function from the PineCoders Color Gradient (16 colors) Framework . It allows more precise control over the range, steps and min/max values of the gradients.
• I use the PineCoders Coding Conventions for Pine to write my scripts.
• I used functions modified from the PineCoders MTF Selection Framework for the selection of timeframes.
█ THANKS TO:
— alexgrover who helped me think through the dampening method used to attenuate signal lines on high ratios of neutral intrabars.
— A guy called Kuan who commented on a Backtest Rookies presentation of their Volume Profile indicator . The technique I use to inspect intrabars is derived from Kuan's code.
— theheirophant , my partner in the exploration of the sometimes weird abysses of `security()`’s behavior at intrabar resolutions.
— midtownsk8rguy , my brilliant companion in mining the depths of Pine graphics. He is also the co-author of the PineCoders Color Gradient Frameworks .
Volume Squeeze Momentum by HypesterTradingview is basically composed by reskins of many great contributors such as Chrismood, Lazybear, RicardoSandos and a few others. Without those guys I would not be able to learn how to code PINE - since the "documentation" is horrible and support is basically also non-existent. So thank you!
So here is another contribution to the community, which I chose to not disclose the code since the community usually reskin the code and do not give credit and this code is 100% mine.
I believe that the volume tools available are poor and lagging so here is my contribution.
I use this tool to filter noise and eliminate fake reversal signals, momentum readings and trend changes on my Spectro M. Use at your own risk.
I've added some pre-set volume profiles and trend configs. Also, the bar colors for ease of use, and all of that can be easily turned on/off and changed in the config menu.
Let me know what you think!
daily poc"The Point of Control (POC) indicator displays the price level with the highest trading volume from the previous trading day. It identifies the price range with the most market activity, visualizing it as a horizontal line on the chart. Traders can use the POC to spot key support and resistance levels, gaining insight into market balance and price acceptance. Especially valuable for day traders focusing on short-term volume profiles and price action."
Tick Profile HeatmapThis is a market internal TICK heatmap with the intent of displaying areas of price associated to stronger reactions with NYSE TICK (by default).
This code is based off of a variation of a Volume Profile coded originally by colejustice who originally used code from LuxAlgo . The full-width volume bars that colejustice setup were replaced with full-width bars representative of TICK breaking +/- $500, the current cumulative value representing the "heat" is comprised of hlc3 by default but that can be changed. In a future update I may add additional logic here to capture highs and lows in the heatmap specifically, and perhaps additional colors.
As with other traditional profiling studies, this indicators purpose is to visualize correspondence to specific price levels, allowing rapid assessment where the most TICK activity is occurring, and where it hasn't been. This information may provide areas of support and resistance and regions where price may move quickly repeatedly.
All of the same input guidance that colejustice provided is the same for those pre-existing inputs:
Inputs are set up such that you can customize the lookback period, number of rows, and width of rows for most major timeframes individually. Timeframes between those available will use the next lower timeframe settings (e.g., 2m chart will use the 1m settings.)
Zero usage of volume is present in this indicator, only TICK data so please don't confuse it with volume studies.
VPLineVPLine is a brand-new line indicator which automatically draws historical POC line with volume profile histograms based on user input session and configurations.
A colossal amount of function is deployed on the indicator: historical POC line, historical VA, historical VA high/low, volume profile histograms, volume profile value text (bid/ask/total), threshold function that limits the extension of the POC line based on user input etc.
Volume CompressorTurns volume into a more informative representation, ready to be further analyzed
...
Rationale
Volume
Back in the "before the quant" days I was a big fan of market & volume profile. Thing is J. Steidlmayer had lotta different ideas & works aside of profiling, it's just most of them ain't got to mainstream, one of them was "Hot / Cold volume" (yes, you can't really google it). From my interpretation, the idea was that in a given asset there is a usual constant volume that stays there no matter what, and if it ever changes it changes very slow and gradually; and there's another kind of, so to say, 'active' volume that actually influences price dynamics and very volatile by its nature. So I've met concept lately, and decided to quantify & model it one day when I'll have an idea how. That day was yesterday.
Compression
When we do music we always use different kinds of filters (low-pass, high pass, etc) for equalization and filtering itself. That stuff we use in finance as well. What we also always use in music are compressors, there dynamic processors that automatically adjust volume so it will be more consistent. Almost all the cool music you hear is compressed (both individual instruments (especially vocals) and the whole track afterwards), otherwise stuff will be too quite and too weak to flex on it, and also DJing it would be a nightmare. I am a big adept of loudness war. So I was like, how can I use compression in finance, when ima get an idea? That day was yesterday as well.
Volume structure
Being inspired by Steidlmayer's idea, I decided to distinguish volume this way:
1) Passive / static volume. The ~ volume that's always there no matter what (hedges, arbitrages, spread legs, portfolio parts etc etc), doesn't affect things;
2) Active / dynamic volume. The volume that flows from one asset to another, really matters and affects things;
3) Excess volume. The last portion of number 2 volume, that doesn't represent any powerful value to affect things.
Now it's clear that we can get rid of number 1 and number 3, the components that don't really matter, and concentrate on number 2 in order to improve information gain, both for ourselves and for the models we feed this data. How?
Model
I don't wanna explain it all in statistical / DSP way for once.
First of all, I think the population of volumes is log-normally distributed, so let's take logs of volumes, now we have a ~ normally distributed data. We take linearly weighted mean, add and subtract linearly weighted standard deviation from it, these would be our thresholds, the borders between different kinds of volumes explained before.
The upper threshold is for downward compression, that will not let volume pass it higher.
The lower threshold is for upward compression, all the volumes lower than this threshold will be brought up to the threshold's level.
Then we apply multipliers to the thresholds in order to adjust em and find the sweet spots. We do it the same way as in sound engineering when we don't aim for overcompression, we adjust the thresholds until they start to touch the signal and all good.
Afterwards, we delete all the number 1 and number 3 volume, leaving us exclusively with the clear main component, ready to be processed further.
We return the volumes to dem real scale.
About the parameters, based on testing I don't recommend changing the thresholds from dem default values, first of all they make sense statistically and second they work as intended.
Window length can and should be adjusted, find your own way, or leave the default value. ML (moving location) length is up to you as well.
So yeah, you can see now we can smooth the data and make it visually appealing not only by applying a smooth filter over it.
All good TV?
Volume+ (RVOL By Time of Day)This script is an enhanced volume indicator.
It calculates relative volume (RVOL) based on the average volume at that time of day (rather than using a moving average).
For example, using this indicator you can see today’s volume during the first 5-minute candle of the market open compared to the previous day’s volume at the market open. Or you can see today’s volume at the market close during the last 15-minute candle compared to the average of the past 20 days of volume at the market close.
Due to the different quantity of candlesticks in a session between Stocks and Forex/Crypto, I separated those markets into separate settings, making this an all-in-one volume indicator that works on all markets.
Settings:
Stocks
If you set the lookback period to 1 on the 5-minute chart and look at the 9:30am candle for a stock, then the current volume bar will show you what today’s volume is compared to yesterday’s 9:30am 5-minute candle.
If you set the lookback period to 15, then the current volume bar will show you what today’s volume is compared to the average of the last 15 days of 9:30am 5-minute candles.
Max Lookback: 64 Sessions
Stocks
This setting is for traders who want to use this indicator on a timeframe lower than the 5-minute chart.
Due to limitations in how many historical bars PineScript can reference, referencing 1-minute and 3-minute bars requires a lot more historical data so I separated the two to allow the 5-minute+ timeframes to have a longer lookback period.
Max Lookback: 12 Sessions
Forex/Crypto
When you set the script to Forex/Crypto, it does the same thing for stocks but calculates based on a 24-hour period.
So if you set the lookback period to 1 on the 1-hour chart and look at the 11:00am candle for a currency pair, then the current volume bar will show you what today’s volume is compared to yesterday’s 11:00am 1-hour candle.
If you set the lookback period to 10, then the current volume bar will show you what today’s volume is compared to the average of the last 10 days of 11:00am 1-hour candles.
Max Lookback: 17 Sessions
What Doesn’t It Work On?
Because I had to manually calculate how many volume candles to look back per timeframe to get the previous session’s candle, I had to hard-code the math in this script.
That means that this indicator will only work on 1m, 3m, 5m, 15m, 30m, 45m, 1h, 2h, 3h, 4h, Daily and Weekly timeframes. If you try to use it on any other timeframe it will revert to a regular volume indicator.
Why Is It Useful?
Similar to volume profile by price, this gives you a volume profile by time in a way that the default volume indicator does not.
For example, you can use this to determine when a stock has a particularly strong opening drive, or when a currency pair has a weak fake-out leading up to the London open, or for general confirmation on trading signals with time-specific volume information to work with.
Colors
The purple line and the faint gray bar is the RVOL value.
The blue number is the percentage of the current volume bar relative to RVOL.
There are four different bar color settings:
Heatmap – Changes color to be brighter based on higher RVOL
Price – Changes color based on price action (like the default TradingView volume indicator)
Traffic – Changes color based on RVOL percentages (for fast visual cues)
Trigger – Changes color only when the specified alert conditions are met
Heatmap:
Traffic:
Trigger:
Price:
Heatmap:
Turns very bright green at 2.0 RVOL
Turns light green at 1.0 RVOL
Turns normal green at 0.75 RVOL
Turns medium green at 0.5 RVOL
Turns very dark green at 0.25 RVOL
Is gray otherwise.
Price:
Turns red if the price action candle closed bearish.
Turns green if the price action candle closed bullish.
Traffic:
Turns red if RVOL is between 1.0 and 1.5.
Turns orange if RVOL is between 1.5 and 2.0.
Turns dark green if RVOL is between 2.0 and 3.0.
Turns bright green if RVOL is above 3.0.
Is gray otherwise.
Trigger:
Turns teal if any of the given alert conditions in the user settings are met.
Alerts
Alerts are optional. You have to set them like any other indicator, by creating a new alert and selecting this indicator.
If you leave the "Alert At RVOL %" setting at 0, then alerts will only be triggered if the current candle exceeds the 1.0 (100%) RVOL level.
If you change the "Alert At RVOL %" setting then alerts will be triggered if the RVOL percentage (blue number) exceeds your given value. The blue number is a percentage of the average, so if it’s at 0.5, then it’s 50% of the average.
Notes
- This indicator only works with regular time bars. It will not work with range, tick, renko etc.
- This script has lookback limitations due to restrictions on how many historical bars PineScript can reference. The lookback limit varies based on the market type you choose. The more bars required for calculation the lower the lookback limit.
- If you use it on the Daily timeframe the lookback period will count as 1 week. If you use it on the Weekly timeframe the lookback period will count as 1 month. So a Lookback of 3 on the Daily would be 3 weeks of averages, a Lookback of 5 on the Weekly would be 5 months of averages (for that Day of Week or Week number).
- Big thanks to @tb12345 for the idea and for helping to field-testing the indicator!
Relative Volume - VPA / VSA / Better VolumeVolume is important.
Volume is VERY important.
But all the existing methods of volume analysis and order flow analysis fall into the same trap: they're all extremely complicated, hard to learn, and difficult for the human brain to distill down to an actual, tradable signal.
The Relative Volume Gradient Paintbars indicator seeks to address this issue by reducing and simplifying concepts from Volume Price Analaysis (VPA), Volume Spread Analysis (VSA), and Market Profile / Volume Profile into a single indication with varying levels of intensity. Rather than adding more complex symbology and cluttering up your charts with arrows and signals and lines as many volume indicators do, relative volume intuitively takes advantage of the dimension of color, and plays to your brain's automatic recognition of color intensity to highlight areas of interest on a chart where large volumes are being traded. These areas can in turn point out levels of support and resistance, or show strength in a move, exposing the actions of larger market participants that are behind a move.
The Relative Volume indicator can calculate based on a time-segmented / time-based / bar-specific average of volume, adjusting for some of the typical spikes in volume that happen at the beginning and end of a trading day; Or it can be calculated based on any length and type of moving average of volume that is desired: simple, exponential, weighted, Wilders, price-weighted, Hull, or TEMA.
This indicator does more than just normal relative share volume. It can also do relative volume-per-range. The idea behind this setting is that when more volume is being traded but very little movement is happening, this can indicate substantial support or resistance, where a lot of trades are likely being absorbed by larger operators. You can choose your own range calculation for this setting, whether you prefer True Range, high-low range, candle body range, close to close range, or any of several other custom settings.
Moreover, the levels or thresholds at which the color intensity changes are completely user-controlled, so you can adjust them upward to tune out more noise, or downward to increase the level of sensitivity. In addition, all of the colors for each of the thresholds are completely user-controlled.
We hope to see TradingView add support for Richard Arms' CandleVolume or Equivolume before too long, as well as Tick Volume or Trade Count Volume data, all of which can add a lot of power to this method of trading.
Range Detect SystemTechnical analysis indicator designed to identify potential significant price ranges and the distribution of volume within those ranges. The system helps traders calculate POC and show volume history. Also detecting breakouts or potential reversals. System identifies ranges with a high probability of price consolidation and helps screen out extreme price moves or ranges that do not meet certain volatility thresholds.
⭕️ Key Features
Range Detection — identifies price ranges where consolidation is occurring.
Volume Profile Calculation — indicator calculates the Point of Control (POC) based on volume distribution within the identified range, enhancing the analysis of market structure.
Volume History — shows where the largest volume was traded from the center of the range. If the volume is greater in the upper part of the range, the color will be green. If the volume is greater in the lower part, the color will be red.
Range Filtering — Includes multi-level filtering options to avoid ranges that are too volatile or outside normal ranges.
Visual Customization — Shows graphical indicators for potential bullish or bearish crossovers at the upper and lower range boundaries. Users can choose the style and color of the lines, making it easier to visualize ranges and important levels on the chart.
Alerts — system will notify you when a range has been created and also when the price leaves the range.
⭕️ How it works
Extremes (Pivot Points) are taken as a basis, after confirming the relevance of the extremes we take the upper and lower extremes and form a range. We check if it does not violate a number of rules and filters, perform volume calculations, and only then is the range displayed.
Pivot points is a built-in feature that shows an extremum if it has not been updated N bars to the left and N bars to the right. Therefore, there is a delay depending on the bars specified to check, which allows for a more accurate range. This approach allows not to make unnecessary recalculations, which completely eliminates the possibility of redrawing or range changes.
⭕️ Settings
Left Bars and Right Bars — Allows you to define the point that is the highest among the specified number of bars to the left and right of this point.
Range Logic — Select from which point to draw the range. Maximums only, Minimums only or both.
Use Wick — Option to consider the wick of the candles when identifying Range.
Breakout Confirmation — The number of bars required to confirm a breakout, after which the range will close.
Minimum Range Length — Sets the minimum number of candles needed for a range to be considered valid.
Row Size — Number of levels to calculate POC. *Larger values increase the script load.
% Range Filter — Dont Show Range is than more N% of Average Range.
Multi Filter — Allows use of Bollinger Bands, ATR, SMA, or Highest-Lowest range channels for filtering ranges based on volatility.
Range Hit — Shows graphical labels when price hits the upper or lower boundaries of the range, signaling potential reversal or breakout points.
Range Start — Show points where Range was created.
Linear Regression Channel UltimateKey Features and Benefits
Logarithmic scale option for improved analysis of long-term trends and volatile markets
Activity-based profiling using either touch count or volume data
Customizable channel width and number of profile fills
Adjustable number of most active levels displayed
Highly configurable visual settings for optimal chart readability
Why Logarithmic Scale Matters
The logarithmic scale option is a game-changer for analyzing assets with exponential growth or high volatility. Unlike linear scales, log scales represent percentage changes consistently across the price range. This allows for:
Better visualization of long-term trends
More accurate comparison of price movements across different price levels
Improved analysis of volatile assets or markets experiencing rapid growth
How It Works
The indicator calculates a linear regression line based on the specified period
Upper and lower channel lines are drawn at a customizable distance from the regression line
The space between the channel lines is divided into a user-defined number of levels
For each level, the indicator tracks either:
- The number of times price touches the level (touch count method)
- The total volume traded when price is at the level (volume method)
The most active levels are highlighted based on this activity data
Understanding Touch Count vs Volume
Touch count method: Useful for identifying key support/resistance levels based on price action alone
Volume method: Provides insight into levels where the most trading activity occurs, potentially indicating stronger support/resistance
Practical Applications
Trend identification and strength assessment
Support and resistance level discovery
Entry and exit point optimization
Volume profile analysis for improved market structure understanding
This Linear Regression Channel indicator combines powerful statistical analysis with flexible visualization options, making it an invaluable tool for traders and analysts across various timeframes and markets. Its unique features, especially the logarithmic scale and activity profiling, provide deeper insights into market behavior and potential turning points.
Volume Heatmap 2024 | NXT2017 Christmas EditionHi big players around the world,
I wish you a merry christmas time.
Today I have a nice present for you: a new volume heatmap indicator for free using!
HISTORY
My first volume heatmap project got a lot of feedback and a big demand. You can find it here:
In this time pinescript version 4 was the newest one and I worked the first time with arrays.
Today we have pinescript version 5 and some new features. This is why I tried again with matrix function and the results are better than I expected.
HOW IT WORKS
The indicator calculates similar like the volume profile. It looks back and every volume where the close price is on the same row area, the volume will cumulated. How much rows the new chart view is showing, you can choose manually.
The mind behind this is to find high volume levels, where high volume catch the price in a range or get function as support/resistance line.
PICTURES
I hope it helps for your trading. You are welcome to give some comments.
Merry christmas and best regards
NXT2017